package com.qujia.station.enums;

public enum StorageStatusEnum {

    WAIT_STORAGE(0,"待入库"),
    STORAGE(1,"已入库"),
    STORAGE_FAIL(2,"入库失败");

    private int code;
    private String msg;

    StorageStatusEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static String getMsg(int code){
        for (StorageStatusEnum statusEnum : StorageStatusEnum.values()){
            if(statusEnum.getCode()==code){
                return statusEnum.getMsg();
            }
        }
        return "";
    }
}
